Skip to content

Conversation

@pan-kot
Copy link
Member

@pan-kot pan-kot commented Dec 12, 2025

Description

An alternative for: #131

The PR introduces a new core test page that shows events synchronisation between standalone and in-chart legends, and includes a fix for the in-chart legend to call clear-highlight event on item highlight exit.

How has this been tested?

  • Manual testing in the new test page
  • Updated unit test
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

this.chartExtraLegend.onClearHighlight();

// Notify the consumer that a clear-highlight action was made.
fireNonCancelableEvent(this.context.handlers.onClearHighlight, { isApiCall: false });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a legend item highlight exits we call onClearChartItemsHighlight() to clear the chart's series highlight accordingly. However, we were not calling the onClearHighlight() in that case - which is a mistake.

@pan-kot pan-kot requested a review from SpyZzey December 12, 2025 12:11
@pan-kot pan-kot marked this pull request as ready for review December 12, 2025 12:12
@pan-kot pan-kot requested a review from a team as a code owner December 12, 2025 12:12
Copy link
Member

@SpyZzey SpyZzey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an infinite loop when hovering and unhovering the legend and charts:
Screenshot 2025-12-12 at 14 34 14

@pan-kot pan-kot force-pushed the experiment-sync-legends branch from e682fd8 to 90910aa Compare December 12, 2025 13:49
@pan-kot
Copy link
Member Author

pan-kot commented Dec 12, 2025

There seems to be an infinite loop when hovering and unhovering the legend and charts: Screenshot 2025-12-12 at 14 34 14

Good catch! I fixed that in the page

SpyZzey
SpyZzey previously approved these changes Dec 12, 2025
@pan-kot pan-kot added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit 2e81e97 Dec 12, 2025
43 of 44 checks passed
@pan-kot pan-kot deleted the experiment-sync-legends branch December 12, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants